package com.hongxun.design.mytools;

import java.text.DecimalFormat;

/**
 * Created by zerdoor_pc on 2016/5/10.
 */
public class MyDecimalFormat {
    public static String getDouble(double l) {
        DecimalFormat df = new DecimalFormat("0.00000000");
        return df.format(l);
    }

    public static double getDouble_6(double l) {
        DecimalFormat df = new DecimalFormat("0.000000");
        return Double.parseDouble(df.format(l));
    }


    public static String getDouble(double l,String s) {
        DecimalFormat df = new DecimalFormat(s);
        return df.format(l);
    }

}
